package com.apr;

import com.apr.service.TestService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dly
 */
@MapperScan(basePackages = "com.apr.mapper")
@SpringBootApplication
@RestController
public class DruidApplication {

    @Autowired
    private TestService testService;

    public static void main(String[] args) {
        SpringApplication.run(DruidApplication.class, args);
    }

    @GetMapping(value = "/test")
    public String test() {
        testService.select();
        return "SUCCESS";
    }

}
